class Cell {
    
    constructor (x, y, size = 10, color = '#000', type = Cell.DEFAULT) {
        this.x = x
        this.y = y
        this.color = color
        this.type = type
        this.prev = null
        this.next = null
        this.size = size
    }

    draw(ctx) {
        let x = this.x * this.size
        let y = this.y * this.size
        // console.log(x, y);
        // console.log(ctx);
        ctx.fillStyle = this.color
        ctx.beginPath()
        ctx.fillRect(x, y, this.size, this.size)
        ctx.strokeRect(x, y, this.size, this.size);
        ctx.closePath()
    }
    
}

Cell.DEFAULT = 0
Cell.SNAKE_HEAD = 1
Cell.FOOD = 1

export default Cell